
#import <AudioToolbox/AudioToolbox.h>
#import <AVFoundation/AVFoundation.h>
#import "cocos2d.h"
#import "ball.h"
#import "batter.h"
#import "PitchingSystem.h"

// BatteryView Layer
@interface BatteryView : CCLayer
{
	CGSize m_windowSize;
	NSInteger m_DeviceKind;			//iPhone or iPad
	
	CCSprite *spBackground; 
	CCSprite *spHitEffect;
	CCSprite *spHitCombo;
	CCLabel *labelScore;
	
	ball *currentBall;
	batter *currentBatter;
	PitchingSystem *currentPS;
	
	NSInteger blnSwing;
	
	NSMutableArray *arrayChance;
	
	SystemSoundID sndHitBad;
	SystemSoundID sndHitGood;
	SystemSoundID sndMitt;
	AVAudioPlayer *player;
}

@property (nonatomic, retain) CCSprite *spBackground;
@property (nonatomic, retain) CCSprite *spHitEffect;
@property (nonatomic, retain) CCSprite *spHitCombo;
@property NSInteger blnSwing; 

// returns a Scene that contains the BatteryView as the only child
+ (id)scene;
- (void)initShortSound;
- (void)initLongSound; 
- (void)initChance;
- (void)updateChance;
@end
